﻿/*
 * 由SharpDevelop创建。
 * 用户： xieen
 * 日期: 2013-08-14
 * 时间: 10:15
 * 
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */
using System;

namespace GoF23Learning._04.Factory_Method
{
	/// <summary>
	/// Description of Class1.
	/// </summary>
	public class Log1
	{
		public string WriteEvent()
		{
			string result = "WriteEvent";
			
			Console.WriteLine(result);
			
			return result;
			
		}
		public string WriteFile()
		{
			string result = "WriteFile";
			
			Console.WriteLine(result);
			
			return result;
			
		}
		public string Write(string logType)
		{
			string result = string.Empty;
			switch (logType.ToLower()) {
				case "event":
					result ="WriteEvent";
					break;
				case "file":
					result ="WriteFile";
					break;
				default:
					result ="defaultlog";
					break;
			}
			
			Console.WriteLine(result);
			
			return result;
			
		}
	}
}
